<form class="layui-form layui-card" action="{:request()->url()}" data-auto="true" method="post" autocomplete="off">
    <div class="layui-card-body padding-left-40">

        <label class="layui-form-item relative block">
            <span class="color-green font-w7">模板key</span>
            <input name="tmpl_key" value='{$vo.tmpl_key|default=""}' placeholder="请输入模板key" class="layui-input">
        </label>

        <label class="layui-form-item relative block">
            <span class="color-green font-w7">模板标题</span>
            <input name="title" value='{$vo.title|default=""}' placeholder="请输入模板标题" class="layui-input">
        </label>



        <div class="layui-form-item">
            <span class="color-green font-w7 label-required-prev">关键词</span>
            <span class="color-desc margin-left-5">Transfer Types</span>
            <table class="layui-table payment-type" lay-skin="nob">
                <thead>
                <tr>
                    <td class="text-center notselect nowrap padding-col-5"><b>标题</b></td>
                    <th class="text-center notselect nowrap padding-col-5" style="width: 350px;" ><b>内容</b></th>
                    <td class="text-center notselect nowrap padding-col-15"><b>颜色</b></td>
                </tr>
                </thead>
                <tbody>
                <tr class="think-bg-white">
                    <td class="text-center notselect nowrap padding-col-5">first</td>
                    <td class="text-center padding-col-5">
                        <input name="firstv" value='{$vo.firstv|default=""}' placeholder="请输入first内容" class="layui-input" style="margin-left: 30px">
                    </td>
                    <td class="text-center padding-col-5">
                        <div class="layui-form-item" style="margin-top: 20px;margin-left: 50px">
                            <div class="layui-inline" style="width: 120px;">
                                <input type="text" value='{$vo.firstc|default=""}' placeholder="请输入first颜色" class="layui-input"
                                       id="firstc" name="firstc">
                            </div>
                            <div class="layui-inline" style="left: -11px;margin-top: 5px;">
                                <div id="firstc-form"></div>
                            </div>
                        </div>
                    </td>

                </tr>

                <tr class="think-bg-white">

                    <td class="text-center notselect nowrap padding-col-5">keyword1</td>
                    <td class="text-center padding-col-5">
                        <input name="keyword1v" value='{$vo.keyword1v|default=""}' placeholder="请输入keyword1内容" class="layui-input" style="margin-left: 30px">
                    </td>

                    <td class="text-center padding-col-5">
                        <div class="layui-form-item" style="margin-top: 20px;margin-left: 50px">
                            <div class="layui-inline" style="width: 120px;">

                                <input type="text" value='{$vo.keyword1c|default=""}' placeholder="请输入keyword1c颜色" class="layui-input"
                                       id="keyword1c" name="keyword1c">
                            </div>
                            <div class="layui-inline" style="left: -11px;margin-top: 5px">
                                <div id="keyword1c-form"></div>
                            </div>
                        </div>
                    </td>

                </tr>

                <tr class="think-bg-white">

                    <td class="text-center notselect nowrap padding-col-5">keyword2</td>
                    <td class="text-center padding-col-5">
                        <input name="keyword2v" value='{$vo.keyword2v|default=""}' placeholder="请输入keyword2内容" class="layui-input" style="margin-left: 30px">
                    </td>

                    <td class="text-center padding-col-5">
                        <div class="layui-form-item" style="margin-top: 20px;margin-left: 50px;">
                            <div class="layui-inline" style="width: 120px;">
                                <input type="text" value='{$vo.keyword2c|default=""}' placeholder="请输入keyword2颜色" class="layui-input" id="keyword2c" name="keyword2c">
                            </div>
                            <div class="layui-inline" style="left: -11px;margin-top: 5px">
                                <div id="keyword2c-form"></div>
                            </div>
                        </div>
                    </td>

                </tr>

                <tr class="think-bg-white">
                    <td class="text-center notselect nowrap padding-col-5">keyword3</td>
                    <td class="text-center padding-col-5">
                        <input name="keyword3v" value='{$vo.keyword3v|default=""}' placeholder="请输入keyword3内容" class="layui-input" style="margin-left: 30px">
                    </td>

                    <td class="text-center padding-col-5">
                        <div class="layui-form-item" style="margin-top: 20px;margin-left: 50px">
                            <div class="layui-inline" style="width: 120px;">
                                <input type="text" value='{$vo.keyword3c|default=""}' placeholder="请输入keyword3颜色" class="layui-input" id="keyword3c" name="keyword3c">
                            </div>
                            <div class="layui-inline" style="left: -11px;margin-top: 5px">
                                <div id="keyword3c-form"></div>
                            </div>
                        </div>
                    </td>
                </tr>

                <tr class="think-bg-white">
                    <td class="text-center notselect nowrap padding-col-5">keyword4</td>
                    <td class="text-center padding-col-5">
                        <input name="keyword4v" value='{$vo.keyword4v|default=""}' placeholder="请输入keyword4内容" class="layui-input" style="margin-left: 30px">
                    </td>

                    <td class="text-center padding-col-5">
                        <div class="layui-form-item" style="margin-top: 20px;margin-left: 50px">
                            <div class="layui-inline" style="width: 120px;">
                                <input type="text" value='{$vo.keyword4c|default=""}' placeholder="请输入keyword4颜色" class="layui-input" id="keyword4c" name="keyword4c">
                            </div>
                            <div class="layui-inline" style="left: -11px;margin-top: 5px">
                                <div id="keyword4c-form"></div>
                            </div>
                        </div>
                    </td>
                </tr>

                <tr class="think-bg-white">
                    <td class="text-center notselect nowrap padding-col-5">remark</td>
                    <td class="text-center padding-col-5">
                        <input name="remarkv" value='{$vo.remarkv|default=""}' placeholder="请输入remark内容" class="layui-input" style="margin-left: 30px">
                    </td>
                    <td class="text-center padding-col-5">
                        <div class="layui-form-item" style="margin-top: 20px;margin-left: 50px">
                            <div class="layui-inline" style="width: 120px;">
                                <input type="text" value='{$vo.remarkc|default=""}' placeholder="请输入remark颜色" class="layui-input" id="remarkc" name="remarkc">
                            </div>
                            <div class="layui-inline" style="left: -11px;margin-top: 5px">
                                <div id="remarkc-form"></div>
                            </div>
                        </div>
                    </td>
                </tr>

                </tbody>
            </table>
        </div>

        <label class="layui-form-item relative block">
            <span class="color-green font-w7">详情链接</span>
            <input name="url" value='{$vo.url|default=""}' placeholder="请输入详情链接" class="layui-input">
        </label>

        <label class="layui-form-item relative block">
            <span class="color-green font-w7">小程序id</span>
            <input name="miniappid" value='{$vo.miniappid|default="wxdb956b9ceb4f237a"}' placeholder="请输入小程序id" class="layui-input">
        </label>

        <label class="layui-form-item relative block">
            <span class="color-green font-w7">小程序链接</span>
            <input name="minipagepath" value='{$vo.minipagepath|default=""}' placeholder="请输入小程序链接" class="layui-input">
        </label>

        <label class="layui-form-item relative block">
            <span class="color-green font-w7">创建时间</span>
            <input name="created_at" value='{$vo.created_at|default=""}' placeholder="系统当前时间" readonly="readonly"
            class="layui-input">
        </label>

        <div class="hr-line-dashed"></div>
        {notempty name='vo.id'}<input type='hidden' value='{$vo.id}' name='id'>{/notempty}
        <div class="layui-form-item text-center">
            <button class="layui-btn" type='submit'>保存数据</button>
            <button class="layui-btn layui-btn-danger" type='button' data-confirm="确定要取消编辑吗？" data-close>取消编辑</button>
        </div>
    </div>

</form>
{block name='script'}

<script>
    window.form.render();
    window.laydate.render({range: false, elem: '#created_at'});
    //表单赋值
    layui.use('colorpicker', function () {
            var $ = layui.$, colorpicker = layui.colorpicker;

            colorpicker.render({
                elem: '#firstc-form'
                , color: '{$vo.firstc|default=""}'
                , done: function (color) {
                    $('#firstc').val(color);
                }
            });
            colorpicker.render({
                elem: '#keyword1c-form'
                , color: '{$vo.keyword1c|default=""}'
                , done: function (color) {
                    $('#keyword1c').val(color);
                }
            });
            colorpicker.render({
                elem: '#keyword2c-form'
                , color: '{$vo.keyword2c|default=""}'
                , done: function (color) {
                    $('#keyword2c').val(color);
                }
            });
            colorpicker.render({
                elem: '#keyword3c-form'
                , color: '{$vo.keyword3c|default=""}'
                , done: function (color) {
                    $('#keyword3c').val(color);
                }
            });
            colorpicker.render({
                elem: '#keyword4c-form'
                , color: '{$vo.keyword4c|default=""}'
                , done: function (color) {
                    $('#keyword4c').val(color);
                }
            });
            colorpicker.render({
                elem: '#remarkc-form'
                , color: '{$vo.remarkc|default=""}'
                , done: function (color) {
                    $('#remarkc').val(color);
                }
            });
        }
    );
</script>

{/block}
